<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>KING神电竞 - 永劫无间专业陪玩预约</title>
    <link rel="stylesheet" href="styles.css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
</head>
<body>
    <header class="header">
        <div class="container">
            <div class="logo">
                <i class="fas fa-crown"></i>
                <h1>KING神电竞</h1>
            </div>
<nav class="nav">
                <a href="#home" class="nav-link active">首页</a>
                <a href="#services" class="nav-link">服务介绍</a>
                <a href="#book" class="nav-link">立即预约</a>
                <a href="#contact" class="nav-link">联系我们</a>
                <div class="admin-dropdown" id="adminDropdown">
                    <button class="nav-link admin-btn" id="adminButton">管理员登录</button>
                    <div class="dropdown-content" id="adminMenu" style="display: none;">
                        <a href="#" onclick="reservationSystem.showAdminDashboard(); return false;">后台管理</a>
                        <a href="#" onclick="reservationSystem.showChangePassword(); return false;">修改密码</a>
                        <a href="#" onclick="reservationSystem.logoutAdmin(); return false;">退出登录</a>
                    </div>
                </div>
            </nav>
        </div>
    </header>

    <main>
        <!-- Hero Section -->
        <section id="home" class="hero">
            <div class="hero-content">
                <h2>永劫无间专业陪玩服务</h2>
                <p>顶级技术大神带你飞，专业团队，安全可靠</p>
                <div class="hero-stats">
                    <div class="stat">
                        <span class="stat-number">1000+</span>
                        <span class="stat-label">满意客户</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number">50+</span>
                        <span class="stat-label">专业陪玩</span>
                    </div>
                    <div class="stat">
                        <span class="stat-number">99%</span>
                        <span class="stat-label">好评率</span>
                    </div>
                </div>
                <button class="cta-button" onclick="scrollToBooking()">立即预约</button>
            </div>
        </section>

        <!-- Services Section -->
        <section id="services" class="services">
            <div class="container">
                <h2 class="section-title">我们的服务</h2>
                <div class="services-grid">
                    <div class="service-card">
                        <i class="fas fa-trophy"></i>
                        <h3>段位陪练</h3>
                        <p>专业大神带你上分，快速提升段位</p>
                        <div class="price" data-price="rank">¥50/小时起</div>
                    </div>
                    <div class="service-card">
                        <i class="fas fa-graduation-cap"></i>
                        <h3>技术教学</h3>
                        <p>一对一指导，掌握核心技巧</p>
                        <div class="price" data-price="teach">¥80/小时起</div>
                    </div>
                    <div class="service-card">
                        <i class="fas fa-users"></i>
                        <h3>组队开黑</h3>
                        <p>与大神组队，体验高端局</p>
                        <div class="price" data-price="team">¥60/小时起</div>
                    </div>
                    <div class="service-card">
                        <i class="fas fa-chess"></i>
                        <h3>战术指导</h3>
                        <p>战术分析，制定专属策略</p>
                        <div class="price" data-price="tactics">¥100/小时起</div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Booking Section -->
        <section id="book" class="booking">
            <div class="container">
                <h2 class="section-title">在线预约</h2>
                <div class="booking-form">
                    <form id="reservationForm">
                        <div class="form-group">
                            <label>游戏昵称</label>
                            <input type="text" id="gameName" required placeholder="请输入您的游戏昵称">
                        </div>
                        <div class="form-group">
                            <label>服务类型</label>
                            <select id="serviceType" required>
                                <option value="">请选择服务类型</option>
                                <option value="rank">段位陪练</option>
                                <option value="teach">技术教学</option>
                                <option value="team">组队开黑</option>
                                <option value="tactics">战术指导</option>
                            </select>
                        </div>
                        <div class="form-group">
                            <label>预约时间</label>
                            <input type="datetime-local" id="bookingTime" required>
                        </div>
                        <div class="form-group">
                            <label>联系方式</label>
                            <input type="text" id="contact" required placeholder="微信/QQ/手机号">
                        </div>
                        <div class="form-group">
                            <label>特殊要求</label>
                            <textarea id="requirements" placeholder="请输入您的特殊要求或备注"></textarea>
                        </div>
                        <button type="submit" class="submit-btn">确认预约</button>
                    </form>
                </div>
            </div>
        </section>

        <!-- Contact Section -->
        <section id="contact" class="contact">
            <div class="container">
                <h2 class="section-title">联系我们</h2>
                <div class="contact-info">
                    <div class="contact-item">
                        <i class="fab fa-weixin"></i>
                        <span>微信：KING-Gaming666</span>
                    </div>
                    <div class="contact-item">
                        <i class="fab fa-qq"></i>
                        <span>QQ：888888888</span>
                    </div>
                    <div class="contact-item">
                        <i class="fas fa-phone"></i>
                        <span>电话：188-8888-8888</span>
                    </div>
                </div>
            </div>
        </section>
    </main>

    <!-- Admin Login Modal -->
    <div id="adminModal" class="modal">
        <div class="modal-content">
            <span class="close" onclick="document.getElementById('adminModal').style.display='none'; document.getElementById('adminUser').value=''; document.getElementById('adminPass').value='';" title="关闭">&times;</span>
            <h2>管理员登录</h2>
            <form id="adminLoginForm">
                <div class="form-group">
                    <label>用户名</label>
                    <input type="text" id="adminUser" required placeholder="请输入用户名">
                </div>
                <div class="form-group">
                    <label>密码</label>
                    <input type="password" id="adminPass" required placeholder="请输入密码">
                </div>
                <button type="submit" class="submit-btn">登录</button>
                <button type="button" class="submit-btn" onclick="document.getElementById('adminModal').style.display='none'; document.getElementById('adminUser').value=''; document.getElementById('adminPass').value='';" style="background: #6c757d; margin-top: 10px;">取消</button>
            </form>
        </div>
    </div>

    <!-- Admin Dashboard -->
    <div id="adminDashboard" class="admin-dashboard" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 1001; overflow-y: auto; background: #f8f9fa;">
        <div class="admin-header">
            <h2>KING神电竞 - 管理后台</h2>
            <button onclick="reservationSystem.hideAdminDashboard()" class="logout-btn" style="background: #6c757d; margin-right: 10px;">返回主页</button>
            <button onclick="reservationSystem.logoutAdmin()" class="logout-btn">退出登录</button>
        </div>
        
        <div class="admin-tabs">
            <button class="tab-btn active" onclick="showTab('bookings')">预约管理</button>
            <button class="tab-btn" onclick="showTab('prices')">价格管理</button>
            <button class="tab-btn" onclick="showTab('activities')">活动管理</button>
            <button class="tab-btn" onclick="showTab('homepage')">首页设置</button>
            <button class="tab-btn" onclick="showTab('settings')">店铺设置</button>
        </div>

        <div id="bookingsTab" class="tab-content">
            <h3>预约列表</h3>
            <div id="bookingsList"></div>
        </div>

        <div id="pricesTab" class="tab-content" style="display: none;">
            <h3>价格管理</h3>
            <div class="price-form">
                <div class="form-group">
                    <label>段位陪练价格</label>
                    <input type="number" id="priceRank" step="10" value="50">
                </div>
                <div class="form-group">
                    <label>技术教学价格</label>
                    <input type="number" id="priceTeach" step="10" value="80">
                </div>
                <div class="form-group">
                    <label>组队开黑价格</label>
                    <input type="number" id="priceTeam" step="10" value="60">
                </div>
                <div class="form-group">
                    <label>战术指导价格</label>
                    <input type="number" id="priceTactics" step="10" value="100">
                </div>
                <button onclick="updatePrices()" class="submit-btn">更新价格</button>
            </div>
        </div>

        <div id="activitiesTab" class="tab-content" style="display: none;">
            <h3>活动管理</h3>
            <div class="activity-form">
                <div class="form-group">
                    <label>活动标题</label>
                    <input type="text" id="activityTitle" placeholder="请输入活动标题">
                </div>
                <div class="form-group">
                    <label>活动内容</label>
                    <textarea id="activityContent" placeholder="请输入活动内容"></textarea>
                </div>
                <div class="form-group">
                    <label>折扣率 (%)</label>
                    <input type="number" id="activityDiscount" min="0" max="100" value="100">
                </div>
                <button onclick="addActivity()" class="submit-btn">添加活动</button>
            </div>
            <div id="activitiesList"></div>
        </div>

        <div id="homepageTab" class="tab-content" style="display: none;">
            <h3>首页设置</h3>
            
            <div class="settings-section">
                <h4>背景图设置</h4>
                <div class="form-group">
                    <label>背景图片URL</label>
                    <input type="url" id="heroBgImage" placeholder="输入图片URL，留空使用默认渐变背景">
                    <small style="color: #666;">建议尺寸：1920x1080，支持jpg、png、webp格式</small>
                </div>
                <div class="form-group">
                    <label>上传背景图（可选）</label>
                    <input type="file" id="bgImageUpload" accept="image/jpeg,image/jpg,image/png,image/webp" onchange="handleBgUpload(event)">
                </div>
                <div class="form-group">
                    <label>背景预览</label>
                    <div id="bgPreview" style="width: 100%; height: 150px; border: 1px solid #ddd; border-radius: 5px; background-size: cover; background-position: center; margin-top: 5px;"></div>
                </div>
                <button onclick="reservationSystem.updateBackground()" class="submit-btn">更新背景图</button>
                <button onclick="reservationSystem.resetBackground()" class="submit-btn" style="background: #dc3545; margin-top: 10px;">恢复默认背景</button>
            </div>
            
            <div class="settings-section">
                <h4>首页文字设置</h4>
                <div class="form-group">
                    <label>主标题</label>
                    <input type="text" id="heroTitle" placeholder="永劫无间专业陪玩服务">
                </div>
                <div class="form-group">
                    <label>副标题</label>
                    <input type="text" id="heroSubtitle" placeholder="顶级技术大神带你飞，专业团队，安全可靠">
                </div>
                <div class="form-group">
                    <label>统计数据1</label>
                    <input type="text" id="stat1Text" placeholder="1000+满意客户">
                </div>
                <div class="form-group">
                    <label>统计数据2</label>
                    <input type="text" id="stat2Text" placeholder="50+专业陪玩">
                </div>
                <div class="form-group">
                    <label>统计数据3</label>
                    <input type="text" id="stat3Text" placeholder="99%好评率">
                </div>
                <button onclick="updateHeroText()" class="submit-btn">更新首页文字</button>
            </div>
            
            <div class="settings-section">
                <h4>服务介绍设置</h4>
                <div class="form-group">
                    <label>段位陪练介绍</label>
                    <textarea id="serviceRankDesc" rows="2" placeholder="专业大神带你上分，快速提升段位"></textarea>
                </div>
                <div class="form-group">
                    <label>技术教学介绍</label>
                    <textarea id="serviceTeachDesc" rows="2" placeholder="一对一指导，掌握核心技巧"></textarea>
                </div>
                <div class="form-group">
                    <label>组队开黑介绍</label>
                    <textarea id="serviceTeamDesc" rows="2" placeholder="与大神组队，体验高端局"</textarea>
                </div>
                <div class="form-group">
                    <label>战术指导介绍</label>
                    <textarea id="serviceTacticsDesc" rows="2" placeholder="战术分析，制定专属策略"</textarea>
                </div>
                <button onclick="updateServiceDescriptions()" class="submit-btn">更新服务介绍</button>
            </div>
        </div>
        
        <div id="settingsTab" class="tab-content" style="display: none;">
            <h3>店铺设置</h3>
            <div class="settings-form">
                <div class="form-group">
                    <label>店铺介绍</label>
                    <textarea id="storeDescription" rows="5" placeholder="请输入店铺介绍"></textarea>
                </div>
                <div class="form-group">
                    <label>联系方式</label>
                    <input type="text" id="storeContact" placeholder="请输入联系方式">
                </div>
                <button onclick="updateSettings()" class="submit-btn">保存设置</button>
            </div>
        </div>
    </div>

    <!-- Password Change Modal -->
    <div id="passwordModal" class="modal">
        <div class="modal-content">
            <span class="close" onclick="document.getElementById('passwordModal').style.display='none';" title="关闭">&times;</span>
            <h2>修改密码</h2>
            <form id="passwordChangeForm">
                <div class="form-group">
                    <label>原密码</label>
                    <input type="password" id="oldPassword" required placeholder="请输入原密码">
                </div>
                <div class="form-group">
                    <label>新密码</label>
                    <input type="password" id="newPassword" required placeholder="请输入新密码">
                </div>
                <div class="form-group">
                    <label>确认新密码</label>
                    <input type="password" id="confirmPassword" required placeholder="请再次输入新密码">
                </div>
                <button type="submit" class="submit-btn">确认修改</button>
                <button type="button" class="submit-btn" onclick="document.getElementById('passwordModal').style.display='none'" style="background: #6c757d; margin-top: 10px;">取消</button>
            </form>
        </div>
    </div>

    <footer class="footer">
        <div class="container">
            <p>&copy; 2024 KING神电竞. 专业永劫无间陪玩服务</p>
        </div>
    </footer>

    <script src="script.js"></script>
</body>
</html>